package com.example.devcaptcha.api;

import com.example.devcaptcha.model.LoginReq;
import com.example.devcaptcha.model.RespModel;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * @Description TODO
 * @Date 2023/1/29 11:29
 * @created by Wanghuafu
 * @Version 1.0.0
 */
@Slf4j
@Controller
@RequestMapping("/")
public class LoginController {


    @GetMapping("/index")
    public String indexLogin(){
        return "login";
    }

    @ResponseBody
    @PostMapping("/toLogin")
    public RespModel toLogin(@RequestBody LoginReq loginReq){
        return  RespModel.sucInstance();
    }

}
